const path = require('path')
module.exports = {
    outputDir: '../backend/public/html',
    publicPath: process.env.NODE_ENV === 'production' ? '/html/' : '/',
    chainWebpack: config => {
        config.resolve.alias.set('@', path.join(__dirname, 'src'))
        return config
    },
    devServer: {
        open: true,
        overlay: {
          warnings: false,
          errors: true
        },
        proxy: {
            '/api': {
                target: 'http://localhost:8000',
                // target: 'http://daxue.laohoulundao.com',
                changeOrigin: true,
                // logLevel: 'debug'
            }
        }
    },
    css: {
        loaderOptions: {
            scss: {
                additionalData: `@import "~@/styles/variables.scss";`
            }
        }
    }
}
